﻿@model IEnumerable<Clirelmgt.Models.MetaTableField>

@{
    ViewBag.Title = "Table";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}

<div class="dashboard-wrapper">
    <div class="left-sidebar">
        <div class="row-fluid">
            <div class="span12">
                <div class="widget">
                    <div class="widget-header">
                        <div class="title">
                            Table Designer for table "@Request.QueryString["Name"]"
                        </div>
                    </div>
                    @using (Ajax.BeginForm("Table", new AjaxOptions { UpdateTargetId = "divUpdate"}))
                    {
                        <input type="hidden" id="TableName" name="TableName" value="@Request.QueryString["Name"]"/>
                        <input type="submit" class="btn btn-success" style="margin: 10px;" value="+ Add" id="Btn_Add" name="Btn_Add" />
                        <input type="submit" class="btn btn-warning2" style="margin: 10px;" value="X Delete" id="Btn_Delete" name="Btn_Delete" />
                        <div id="divUpdate">
                            @{ Html.RenderPartial("TableFieldList", Model); }
                        </div>
                        <div class="form-actions no-margin">
                            <button type="submit" class="btn btn-info pull-right" style="margin-left: 10px;" id="Btn_SaveCompile" name="Btn_SaveCompile" >
                                Compile & Save
                            </button>
                            <button type="submit" class="btn btn-info pull-right" id="Btn_Save" name="Btn_Save">
                                Save
                            </button>

                            <div class="clearfix">
                            </div>

                        </div>
                    }
                </div>
            </div>
        </div>

    </div>
</div>
